/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.services.pos;

import com.giant.authentication.User;
import com.giant.entities.pos.PInvoice;
import com.giant.entities.pos.PInvoiceProd;
import com.giant.entities.pos.PInvoiceSeller;
import com.giant.exceptions.OperacionInvalidaException;
import java.util.List;
import java.util.Map;
import javax.ejb.Local;

/**
 *
 * @author harold
 */
@Local
public interface ServiceInvoiceLocal {
    
    /**
     * 
     * @param invoice
     * @throws OperacionInvalidaException 
     */
    public void addInvoice(PInvoice invoice, List<PInvoiceProd> products, PInvoiceSeller invoiceSeller)throws OperacionInvalidaException;

    /**
     * 
     * @param id
     * @throws OperacionInvalidaException 
     */
    public void removeInvoice(long id)throws OperacionInvalidaException;

    /**
     * 
     * @return 
     */
    public List<PInvoice> getInvoices();
    
    /**
     * 
     * @return 
     */
    public List<PInvoice> getInvoicesFilterSql(String sql);
    
    /**
     * 
     * @param a
     * @param map
     * @return 
     */
     public List<PInvoice> getInvoicesFilter(String a, Map<String, String> map);
     
     public PInvoice getLastInvoice();
     
     public void updateInvoice(PInvoice invoice);
     
     public void annulInvoice(PInvoice invoice);
}
